package com.pti.usermanager.utils;

import java.util.Random;

/**
 * @ClassName: KeyUtils
 * @Author: liumengyao
 * @Description: 唯一值工具类
 * @Date: 2019/2/18
 */
public class KeyUtils {


    /**
     * @Author liumengyao
     * @Description 产生唯一的key
     * @Date 2019/2/18
     */
    public static synchronized String genUniqueKey(){
        Random random = new Random();
        int number = random.nextInt(900000) + 100000;
        String key = System.currentTimeMillis() + String.valueOf(number);
        return MD5Utils.getMd5(key);
    }
}
